<%--/*
- * @description: 用户搜索页
- * @author: huangchuting
- * @update: huangchuting (2021/1/9 22:43)
- */--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>校园租赁-用户搜索页</title>
</head>
<link rel="stylesheet" href="/static/css/new-publish.css">
<link rel="stylesheet" href="/static/css/search.css">
<body>
    <c:import url="../public/head.jsp"></c:import>
    <script>
        shop.innerHTML = '<span>·&#12288;一起搜索吧</span>'
    </script>
    <div class="divWarp">
        <div class="contentWarp">
            <div class="searchWarp">
                 <form class="searchForm" method="post" action="/Item/search">
                     <input type="hidden" value="0" name="pageNo">
                    <input type="text" name="search" class="searchText" placeholder="查什么呢你，你查不到的" value="${search}">
                    <input type="submit" name="searchFromBut" class="searchFromBut" value="查询">
                </form>
            </div><br>
            <div class="searchContent">
                <ul>
                <c:forEach items="${itemListPage}" var="var" varStatus="vs">
                    <li>
                        <div class="imageWarp">
                            <a href="/Item/item-news?item_id=${var.item_id}"><img src="/static/images/item/${var.image}"></a>
                        </div>
                        <div class="dataWarp">
                            <h3>${var.item_name}</h3>
                            <p>
                                商品类型：${var.type}
                            </p><br>
                            <p class="price">
                                商品价格：${var.price}
                            </p><br>
                        </div>
                    </li>
                </c:forEach>
                </ul>
            </div>
            <div class="navPage">
                <table>
                    <tr>
                        <td><a href="/Item/search?search=${search}&&pageNo=0">首页</a></td>
                        <td><a href="/Item/search?search=${search}&&pageNo= ${pageNo-1}">上一页</a></td>
                        <td><a href="/Item/search?search=${search}&&pageNo= ${pageNo+1}">下一页</a></td>
                        <td><a href="/Item/search?search=${search}&&pageNo= ${pageMax}">尾页</a></td>
                        <td>共${count}条记录，共${pageCount}页</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</body>
</html>